/<template>
  <div>购物车
    <ul>
      <li v-for="item in $store.state.list" :key="item.id">
        <img :src="item.img" alt="">
        <h2>{{item.title}}</h2>
        <h2>{{item.text}}</h2>
        <h2>￥{{item.price}}元</h2>
        <h2>共  {{item.num}}  件</h2>
      </li>
    </ul>
  </div>
</template>

<script>
import { mapActions } from 'vuex'
export default {
  mounted(){
      this.getList()
  },
  methods:{
    ...mapActions(['getList'])
  }
}
</script>

<style>

</style>